package at.ltasat;

import java.util.HashMap;
import java.util.Map;

import at.ltasat.classifier.ClassifierFactories;
import at.ltasat.classifier.ClassifierFactory;
import at.ltasat.classifier.dt.DecisionTreeClassifierFactory;
import at.ltasat.classifier.knn.KNearestNeighbourClassifierFactory;
import at.tasat.cnf.Cnf;

public final class CnfClassifierFactories implements ClassifierFactories<Cnf, ArgumentClazzData> {

	public static CnfClassifierFactories INSTANCE = new CnfClassifierFactories();
	private static Map<String, ClassifierFactory<Cnf, ArgumentClazzData>> factories = new HashMap<String, ClassifierFactory<Cnf, ArgumentClazzData>>();

	static {
		add(new KNearestNeighbourClassifierFactory<Cnf, ArgumentClazzData>());
		add(new DecisionTreeClassifierFactory<Cnf, ArgumentClazzData>());
	}

	private static void add(ClassifierFactory<Cnf, ArgumentClazzData> factory) {
		factories.put(factory.getName(), factory);
	}

	private CnfClassifierFactories() {
		// nothing to do
	}

	public ClassifierFactory<Cnf, ArgumentClazzData> get(String name) {
		return factories.get(name);
	}
	/*
	 * public static Map<String, ClassifierFactory<Cnf, ArgumentClazzData>>
	 * get() { return factories; }
	 */

}
